#include "widget.h"
#include "ui_widget.h"

#include <thread>

Widget::Widget(QWidget *parent)
    : QWidget(parent)
    , ui(new Ui::Widget)
{
    ui->setupUi(this);

    ui->lcdNumber->display(10);
    int value = ui->lcdNumber->intValue();
    while(value)
    {
        std::this_thread::sleep_for(std::chrono::seconds(1));
        value -= 1;
        ui->lcdNumber->display(value);
    }
}

Widget::~Widget()
{
    delete ui;
}

